package projet;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JTextField;
import javax.swing.JButton;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import javax.swing.JPasswordField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class Ident extends JFrame{

	public JTextField txtf_login;
	public JPasswordField txtf_password;
	public JButton btn_connexion;
	private JLabel lbl_erreur_connexion;

	

	/**
	 * Create the application.
	 */
	public Ident() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		setTitle("Identification");
		setBounds(100, 100, 450, 300);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		getContentPane().setLayout(null);
		
		JLabel lbl_login = new JLabel("Login :");
		lbl_login.setBounds(62, 61, 81, 20);
		getContentPane().add(lbl_login);
		
		txtf_login = new JTextField();
		txtf_login.setBounds(167, 61, 107, 20);
		getContentPane().add(txtf_login);
		txtf_login.setColumns(10);
		
		btn_connexion = new JButton("Connexion");
		
		btn_connexion.setBounds(167, 149, 107, 23);
		getContentPane().add(btn_connexion);
		
		txtf_password = new JPasswordField();
		txtf_password.setBounds(167, 103, 107, 20);
		getContentPane().add(txtf_password);
		
		JLabel lbl_password = new JLabel("Password :");
		lbl_password.setBounds(62, 103, 81, 20);
		getContentPane().add(lbl_password);
		
		lbl_erreur_connexion = new JLabel("identifiants incorrects");
		lbl_erreur_connexion.setBounds(167, 203, 199, 14);
		lbl_erreur_connexion.setVisible(false);
		getContentPane().add(lbl_erreur_connexion);
		
		
	}
	
	public void show_error_connexion(boolean show){
		lbl_erreur_connexion.setVisible(show);
	}
}
